﻿using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using Equation.Enterprise.Framework.ApplicationServices;

namespace ENail.Domain.Core.Contract.Services
{
    public interface ICustomerService : IApplicationService
    {
        /// <summary>
        /// Helps view all customers on list view
        /// </summary>
        /// <returns>List of all customers</returns>
        IList<Customer> GetAllCustomers();

        /// <summary>
        /// Helps view customers for search view
        /// </summary>
        /// <param name="where">Lambda condition to get customers</param>
        /// <returns></returns>
        IList<Customer> GetCustomers(Expression<Func<Customer, bool>> where);

        /// <summary>
        /// Helps view details of an customer
        /// </summary>
        /// <param name="id">Identity of customer</param>
        /// <returns>Customer with specified identity</returns>
        Customer GetCustomer(int id);

        /// <summary>
        /// Insert an customer from view
        /// </summary>
        /// <param name="customer">Customer to be inserted</param>
        /// <returns>Number of records affected</returns>
        int InsertCustomer(Customer customer);

        /// <summary>
        /// Update an customer from view
        /// </summary>
        /// <param name="customer">Customer to be updated</param>
        /// <returns>Number of records affected</returns>
        int UpdateCustomer(Customer customer);

        /// <summary>
        /// Helps view active customers only
        /// </summary>
        /// <returns>All active customers</returns>
        IList<Customer> GetAllActiveCustomers();

        /// <summary>
        /// Helps to inactive an customer
        /// </summary>
        /// <param name="customer">Customer to be inactive</param>
        /// <returns>Number of records affected</returns>
        int InActiveCustomer(Customer customer);

    }
}
